var t = require("../../@babel/runtime/helpers/toArray");

Component({
    properties: {
        options: {
            type: Array
        }
    },
    data: {
        workday: [ !1, !1, !1, !1, !1, !1, !1 ]
    },
    lifetimes: {
        attached: function() {},
        detached: function() {},
        ready: function() {}
    },
    methods: {
        chooseIt: function(a) {
            var e = this, r = a.currentTarget.dataset.index, o = this.data.workday, i = !this.data.workday[r];
            o[r] = i, e.setData({
                workday: o
            });
            var n = t(e.data.options).slice(0);
            n.forEach(function(t, a) {
                t.checked = e.data.workday[a];
            }), this.triggerEvent("change", n);
        }
    }
});